/* chimaera_message_index-table.c : store message index using btree 
 *
 * ====================================================================
 * Copyright (c) 2008-2009 Chimaera team.  All rights reserved.
 *
 *
 * @author kkndyu
 * @mail kkndyu@gmail.com
 * ====================================================================
 */

#ifndef SVN_LIBSVN_FS_CHIMAERA_MESSAGE_INDEX_TABLE_H
#define SVN_LIBSVN_FS_CHIMAERA_MESSAGE_INDEX_TABLE_H

#define APU_WANT_DB
#include <apu_want.h>

#include "svn_fs.h"

#include "../fs.h"
#include "../trail.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */



int svn_fs_bdb__open_chimaera_message_index_table(DB **chimaerauser_p,
                                     DB_ENV *env,
                                     svn_boolean_t create);




svn_error_t *svn_fs_bdb__get_chimaera_new_message(chimaeramessage_t **chimaeramessage_p,
										   apr_int32_t *num,
										   apr_int32_t user_recno,
										   svn_fs_t *fs,
                                           apr_pool_t *pool);


svn_error_t *svn_fs_bdb__put_chimaera_message_index(chimaeramessage_t *chimaeramessage_p,
										   svn_fs_t *fs, DB_TXN *txn, apr_pool_t *pool);



#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* SVN_LIBSVN_FS_REV_TABLE_H */

